package com.elasticsearchtemplate.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;

/**
 * mapping注解可以不加，它对应es的mapping
 * 如果不加Document注解，默认查找的索引是类名
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

@Document(indexName = "emps",createIndex = false)
//@Mapping
public class Emp {
    private int id;
    private int age;
    private String name;
    private String birthplace;
}
